#!/bin/sh
# Environment
# _NETBEANS_HOME
# _NETBEANS_OPTS
# _NETBEANS_JAVA_HOME
# _IDE_AUTHOR
#

if [ -z "{_NETBEANS_HOME}" ] && [ -z "${_default_netbeans_home}" ]; then
  echo "_default_netbeans_home not configured" 1>&2; exit 1
fi

. $DEV_HOME/tools/author.sh

_default_netbeans_java_home="${_default_java_home}"

_NETBEANS_HOME="${_NETBEANS_HOME:-${_default_netbeans_home}}"
_NETBEANS_JAVA_HOME="${_NETBEANS_JAVA_HOME:-${JAVA_HOME:-${_default_netbeans_java_home}}}"

NETBEANS_DATA=$DEV_DIR/.netbeans
NETBEANS_HOME="${_NETBEANS_HOME}"
NETBEANS_JAVA_HOME="${_NETBEANS_JAVA_HOME}"
NETBEANS_OPTS="${_NETBEANS_OPTS}"
PATH="${DEV_HOME}/lib/netbeans:${PATH}"

$DEV_CLEAN && unset _NETBEANS_HOME _NETBEANS_JAVA_HOME _NETBEANS_OPTS _default_netbeans_home _default_netbeans_java_home

export NETBEANS_DATA
export NETBEANS_HOME
export NETBEANS_JAVA_HOME
export NETBEANS_OPTS
export PATH
